#pragma once

#include "../utility.h"

class CommonObject
{
public:
	enum Object_View_Priority
	{
		OBJ_VP_ALLWAYS_TOP = -1,
		OBJ_VP_DISTANCE,
		OBJ_VP_ALLWAYS_BOTTOM,
	};

public:
//	CommonObject(void);
	CommonObject(bool bShow = true);
	virtual ~CommonObject(void);

	virtual void Rotate(float angle, float axisX, float axisY, float axisZ) = 0;
	virtual void Scale(float scaleX, float scaleY, float scaleZ) = 0;
	virtual void Translate(float transX, float transY, float transZ) = 0;
	
	virtual void Update() = 0;
	virtual void Paint() = 0;

	virtual void Show();
	virtual void Hide();
	virtual bool IsVisible() { return m_bShow; }
	void SetViewPriority(Object_View_Priority pri) { m_viewPriority = pri; }
	Object_View_Priority GetSetViewPriority() { return m_viewPriority; }
	float GetDistance(Point3f point);
	friend int IsFarThan(CommonObject* lp, CommonObject* rp);

	static unsigned int ObjectCount();

private:
	static unsigned int s_objCount;

protected:
	bool m_bShow;
	Object_View_Priority m_viewPriority;
	Point3f m_origin;
//	float m_scaleX, m_scaleY, m_scaleZ;
};

int IsFarThan(CommonObject* lp, CommonObject* rp);